package myJs.myPkg.d3v4

import org.scalajs.dom
import org.scalajs.dom.Element

import scala.scalajs.js
import scala.scalajs.js.annotation.{JSImport, JSName}
import scala.scalajs.js.|

/**
 * Created by yz on 21/7/2021
 */


object d3 {

  @inline implicit def d3toD3Scale(d3t: d3.type): d3scale.type = d3scale

  @inline implicit def d3toD3Selection(d3t: d3.type): d3selection.type = d3selection

  @inline implicit def d3toD3Axis(d3t: d3.type): d3axis.type             = d3axis

  @js.native
  trait BaseEvent extends js.Object {
    var `type`: String = js.native
    var sourceEvent: dom.Event = js.native
  }

  type Scale                                            = d3scale.Scale
  type Interval                                         = d3time.Interval
  type Transition[Datum]                                = d3transition.Transition[Datum]
  
}


object d3Type {

  import d3._

  type CurrentDom = dom.EventTarget
  type Index = Int
  type Group      = js.UndefOr[Int]

}
